<!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="x-ua-compatible" content="IE=edge, chrome=1">
    <title>j5shop积分商城</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link href="/street/css/public.css" type="text/css" rel="stylesheet"/>
    <link href="/street/css/index.css" type="text/css" rel="stylesheet"/>
    <link href="/street/css/gouwuche.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript" src="/street/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/street/js/slide.js"></script>
    <script src="/js/plugins/layer/layer.min.js"></script>
</head>
<body>
<script>
    $(function(){
        $('.nav ul li').hover(function(){
            $(this).children(".details").show();
        },function(){
            $(this).children(".details").hide();
        });
        $('#my').hover(function(){
            $(this).find("div").show();
        },function(){
            $(this).find("div").hide();
        });
    });
</script>

<div th:replace="street/layout/mallHeader"></div>
<!----------------轮播图-------------------->
<div class="index_banner minWidth" id="focus">
    <ul>
        <li th:each="banner:${bannerList}" th:style="'background:url(' + ${banner.img} + ') no-repeat center;height: 452px;'">
            <a th:href="${banner.url}" title="" target="_blank"></a></li>
    </ul>
</div>
<div class="clear"></div>
<!--------------中间部分------------->
<div class="wt1080 middle">
    <div class="fl">
        <ul>
            <li>
                <img src="/street/image/bg3.png">
                <p>全球正品货源</p>
            </li>
            <li>
                <img src="/street/image/bg4.png">
                <p>全球直邮</p>
            </li>
            <li>
                <img src="/street/image/bg5.png">
                <p>一件代发</p>
            </li>
            <li>
                <img src="/street/image/bg6.png">
                <p>售后无忧</p>
            </li>
        </ul>
    </div>
    <div class="fr">
        <p class="one">在线客服：
            <a href="#"><img src="/street/image/tubiao2.png"></a>&nbsp;&nbsp;
            <a href="#"><img src="/street/image/tubiao2.png"></a>&nbsp;&nbsp;
            <a href="#"><img src="/street/image/tubiao2.png"></a>&nbsp;&nbsp;
            <span>（时间：9：00-24：00）</span>
        </p>
        <p class="two">联系电话：<i>028-6133 8882</i></p>
    </div>
    <div class="clear"></div>
</div>

<!---------------商品介绍一大块----------------->
<div class="product">
    <div class="wt1080">
        <!------------上部分----------->
        <div class="up">
            <div class="crazy fl">今日疯抢</div>
            <a href="#"><img src="/street/image/guanggao.png" class="fr"></a>
            <div class="clear"></div>
        </div>
        <!------------下部分----------->
        <div class="down">
            <div class="fl">
                <ul>
                    <li th:each="jf:${jfList}">
                        <div class="pic"><a th:href="@{'/street/jfDetail/'+${jf.id}}" title="美国/Kirkland">
                            <img th:src="@{${jf.img}}"></a></div>
                        <p><a th:href="@{'/street/jfDetail/'+${jf.id}}" th:text="${jf.title}"></a></p>
                        <div>
                            <span class="one" th:text="'￥'+${jf.prices}+'积分'">￥88.00</span>
                            <span><a class="duihuan" th:onclick="'duihuan('+${jf.id}+')'">请兑换</a></span>
                            <span class="two" th:text="'网购￥'+${jf.prices}">网购￥96.00</span>
                            <div class="clear"></div>
                        </div>
                    </li>

                </ul>
            </div>

        </div>
        <div class="clear"></div>
        <!---------------------热销------------------>
        <div class="hot">
            <div class="title">热销推荐</div>
            <div class="content">
                <ul>
                    <li th:each="com:${commList}">
                        <div class="pic"><a th:href="@{'/street/goodsDetail/'+${com.id}}">
                            <img th:src="@{${com.img}}"></a></div>
                        <p class="c_t"><a th:href="@{'/street/goodsDetail/'+${com.id}}" th:text="${com.title}">Regen10片</a></p>
                        <p class="price" th:text="'￥'+${com.prices}">￥89.00</p>
                        <a href="#" class="goumai" th:onclick="'addCart('+${com.id}+')'">立即购买</a>
                    </li>
                </ul>
                <div class="clear"></div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
    <!--------------商品开始---------------->

</div>
<script type="text/javascript">

    function duihuan(goodsid){
        var count=1;
        $.ajax({
            type: "post",
            url: '/person/street/duihuan',
            data: {
                goodsid:goodsid,
                count:count
            },
            dataType: "json",
            success:function(data) {
                if(data.code==0){
                    layer.msg('兑换成功');
                    window.location.href = "/street/jfindex";
                }else{
                    layer.msg(data.msg);
                }
            }
        });
    }

    function addCart(goodsid){
        var count=1;
        $.ajax({
            type: "post",
            url: '/person/street/addCart',
            data: {
                goodsid:goodsid,
                count:count},
            dataType: "json",
            success:function(data) {
                if(data.code==0){
                    window.location.href = "/person/street/likBuy/"+goodsid;
                }else if(data.success=='login'){
                    window.location.href = "/street/login"
                }
            }
        });
    }

</script>
<div th:replace="street/layout/mallFooter"></div>
</body>
</html>